﻿<Window x:Class="TimeKeeper.Views.TimeEditView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
             mc:Ignorable="d" Title="Time window" Height="131" Width="181" ResizeMode="NoResize" WindowStartupLocation="CenterOwner">
    <Window.Resources>
        <Style TargetType="{x:Type extToolkit:DoubleUpDown}">
            <Style.Triggers>
                <Trigger Property="Validation.HasError" Value="true">
                    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Grid.Column="0" Text="Hours:" Margin="4" HorizontalAlignment="Right"/>
        <extToolkit:DoubleUpDown Grid.Row="0" Grid.Column="1" x:Name="TimeOnProject_Time" Margin="4" Minimum="0" Maximum="24" Increment="0.5" IsEditable="False"/>
        <TextBlock Grid.Row="1" Grid.Column="0" Text="Date:" Margin="4" HorizontalAlignment="Right"/>
        <DatePicker Grid.Row="1" Grid.Column="1" x:Name="TimeOnProject_Date" Margin="4" />
        <StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button x:Name="Ok" Content="Ok" Margin="4" Width="60"/>
            <Button x:Name="Cancel" Content="Cancel" Margin="4" Width="60"/>
        </StackPanel>
    </Grid>
</Window>
